<template>
  <div class="box">
    <el-tabs v-model="val" @tab-click="handleClick">
      <el-tab-pane label="用户列表" name="1">
        <user-list />
      </el-tab-pane>
      <el-tab-pane label="权限管理" name="2">
        <authority-management />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import userList from './components/user-list.vue'
import authorityManagement from './components/authority-management.vue'

export default {
  name: 'UserRights',
  components: { userList, authorityManagement },
  props: {},
  data() {
    return {
      val: '1'
    }
  },
  filters: {},
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  beforeDestroy() {},
  methods: {
    handleClick(tab) {
      this.val = tab._props.name
    }
  }
}
</script>

<style scoped lang="scss">
.box {
  padding: 20px;
}
</style>
